// 获取 token
export const getToken = state => {
  if (localStorage.getItem('token') !== '' && localStorage.getItem('token') !== null) {
    state.token = localStorage.getItem('token')
    return state.token
  } else {
    return ''
  }
}
// 获取返回的url
export const getReturnPath = state => {
  return state.returnPath
}
// 商品类型
export const productType = () => {
  return ['实物商品', '虚拟商品', '卡卷商品']
}
// 订单类型
export const orderType = () => {
  return ['普通订单', '卡券提货订单']
}
// 退货类型
export const getRefundTypes = () => {
  return ['退款', '退款退货']
}
// 退货服务状态类型
export const getReturnServiceStatusType = () => {
  return {
    1: '申请中',
    2: '已取消(申请已拒绝)',
    3: '待寄货',
    4: '待收货',
    5: '已取消(拒绝退货)',
    6: '已完成'
  }
}
// 是否开票
export const isInvoice = () => {
  return ['是', '否']
}
